<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <meta charset="UTF-8">
    <title class="text-center">欢迎页面</title>
</head>
<body>

<!-- end::all[] -->
<form class="form-signin" th:action="@{/vertify}">
    <div class="modal-dialog" style="margin-top: 10%;">
        <div class="modal-content">
            <div class="modal-header text-center">
                <h4 class="modal-title text-center" id="myModalLabel">登录</h4>
            </div>
            <div class="modal-body" id = "model-body">
                <div class="form-group">
                    <input type="text" name="Sno" id="Sno" class="form-control"placeholder="学号" autocomplete="off"/>
                </div>
                <br>
                <div class="form-group">
                    <input type="text" name="password" id="password" class="form-control" placeholder="密码" autocomplete="off"/>
                </div>
            </div>
            <div class="modal-footer">
                <div class="form-group">
                    <button type="submit" class="btn btn-primary" onclick="checkboxResult()">登陆</button>
                </div>
            </div>
        </div>
    </div>
</form>



<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type=" text/javascript">
    function checkboxResult(){
        var Sno = document.getElementById("Sno").value;
        var ls = window.localStorage;
        ls.setItem("Sno",Sno);
        console.log(ls.getItem("Sno"));
        console.log(ls.getItem("Sno"));
    }
</script>



</body>
</html>